<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> <Somnus:sitecfg name="sitetitle"/> </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="description" content=" <Somnus:sitecfg name="sitedescription"/> ">
<meta name="Keywords" content=" <Somnus:sitecfg name="sitekeywords"/> ">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/mui.min.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/mui.picker.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/mui.poppicker.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/newpay-bb7fcb5546.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/feiqi-ee5401a8e6.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/pay-2b02ca7987.css">
<style>
	.mui-input-group .mui-input-row, .mui-input-row{
	    height: 45px;
		padding-right: 10px;
	}
	.marea{padding-right: 15px;}
	.regfrm label {
	    padding: 14px 15px;
	}
	.marea label {
	    padding: 14px 0;
	}
	.mui-input-row label~input, .mui-input-row label~select, .mui-input-row label~textarea {
	    height: 45px;
	    text-align: right;
	}
	.mui-input-row:last-child:after{
    height: 0;
	}
	@media screen and (max-width: 321px){
		.marea label {
		    font-size: 14px;
		    width: 24%;
		    padding-top: 15px;
		}
		.marea label~input {
		    width: 76%;
		}
		.regfrm .mui-input-row label {
		    width: 24%;
		    white-space: nowrap;
		    font-size: 14px;
		    padding: 15px 15px;
		}
		.regfrm .mui-input-row input {
		    font-size: 14px;
		    width: 74%;
		}			
	}
	@media screen and (max-width: 350px){
		.marea label~input {
	        font-size: 13px;			   
		}
	}
	.seltarr {
	    display: block;
	    position: absolute;
	    top: 20px;
	    right: 10px;
	}
	
	.sfz_box{ background:#fff; padding:5px 2px; height:137px;}
	.sfz_box:after{ content:''; clear:both;}
</style>
</head>
<body class="newbg">
 	<!-- header -->
 	<header class="mui-bar mui-bar-nav hnav">
		<a class="back" href="javascript:history.go(-1)"></a>
		<h1 class="mui-title">审核信息</h1>
	</header>
	<!-- header end-->
<div class="mui-content">
	<!-- paymoney -->
	<article class="tipinfo">		
    <notempty name="userinfo">
		您的信息已经审核！
        <else />
        填写真实有效的信息，审核才会通过哦~
    </notempty>
	</article>
	<div class="mui-input-group regfrm">
    	<div class="mui-input-row">
			<label>類别</label>
			<input type="text" id="zxqsname1" value="{$userinfo.user_type}" name="user_type" placeholder="請選擇類别" class="form-control">
		</div>

		<div class="mui-input-row">
			<label>额度</label>
			<input type="text" id="truename" name="truename" class="mui-input-clear mui-input nofocus" value="{$userinfo.truename}" placeholder="請輸入额度" data-input-clear="2" >
		</div>

	</div>



	<section class="msub" style="position: relative;">
		<button type="button" class="mui-btn mui-btn-danger mui-button-pay mui-button-gry" onClick="saveInfo();">下壹步</button>
		<!-- 提示 -->
		<div style="display: none;position: absolute;" class="errdeo" id="messageBox">
		</div>	
	</section>
	
</div>
<script src="__PUBLIC__/home/js/jquery-1-fe84a54bc0.11.1.min.js"></script>
<script src="__PUBLIC__/home/js/stuCheck-ae09551939.js"></script>
<script src="__PUBLIC__/home/js/geihuaCom-1088667498.js"></script>
<script src="__PUBLIC__/home/js/mui.min.js"></script>
<script src="__PUBLIC__/home/js/lrz.all.bundle.js"></script>
<script src="__PUBLIC__/home/js/mui-bd98b45634.picker.js"></script>
<script src="__PUBLIC__/home/js/mui-9fb36284ae.poppicker.js"></script>
<script src="__PUBLIC__/home/js/city-564994092a.data.js" type="text/javascript" charset="utf-8"></script>
<script src="__PUBLIC__/home/js/city-67f8c196d0.data-3.js" type="text/javascript" charset="utf-8"></script>


<script>

function showalert(msg){
	$("#messageBox").html(msg);
	$("#messageBox").show();
	setTimeout(function(){
		$("#messageBox").hide();
	},2000);
}


function checkval(val_){
	if(val_ == '' || val_ == null){
		return false;
	}else{
		return true;
	}
}


//保存资料
function saveInfo(){

	var user_type = $("#zxqsname1").val();
	var truename = $("#truename").val();


	if(checkval(user_type) && checkval(truename)){
		$.post(
			"{:U('Info/lxedinfo')}",
			{
				user_type:user_type,
				truename:truename
			},
			function (data,state){
				if(state != "success"){
					showalert("請求數據失敗,請重試!");
				}else if(data.status == 1){
					showalert("保存成功!");
					window.location.href = "{:U('Info/chaxunjindu2')}";
				}else{
					showalert(data.msg);
				}
			}
		);
	}else{
		showalert("資料填寫不完整,請檢查!");
	}
}


(function($, doc) {
	$.init();
	$.ready(function() {
		
		var person = new $.PopPicker({
			layer: 3
		});
		person.setData([{value:"商业",text:"商业"},{value:"企业",text:"企业"}]);
		var showCityPickerButton = doc.getElementById('zxqsname1');
		showCityPickerButton.addEventListener('tap', function(event) {
			person.show(function(items) {
				var tmpval = (items[0] || {}).text;
				setPerson("user_type",tmpval);
			});
		}, false);
		
	});
})(mui, document);

function setPerson(spanid,valname){
	$("input[name='"+spanid+"']").val(valname);
}

</script>
<div style="display: none;">
	<Somnus:sitecfg name="sitecode"/>
</div>
</body>
</html>